package com.mxpio.erp.quality.service.impl;

import com.mxpio.erp.common.quality.entity.VEUnqualifiedDisposal;
import com.mxpio.erp.common.quality.entity.VEUnqualifiedProduct;
import com.mxpio.erp.common.quality.service.VEUnqualifiedDisposalService;
import com.mxpio.erp.common.quality.service.VEUnqualifiedProductService;
import com.mxpioframework.jpa.JpaUtil;
import com.mxpioframework.jpa.query.Criteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
public class VEUnqualifiedProductServiceImpl implements VEUnqualifiedProductService {
    @Override
    @Transactional(readOnly = true)
    public List<VEUnqualifiedProduct> list(Criteria c) {
        return JpaUtil.linq(VEUnqualifiedProduct.class).where(c).list();
    }

    @Override
    @Transactional(readOnly = true)
    public Page<VEUnqualifiedProduct> listPage(Pageable pageAble, Criteria c) {
        return JpaUtil.linq(VEUnqualifiedProduct.class).where(c).paging(pageAble);
    }
}
